An image imaged by an imaging device has a characteristic that its peripheral area becomes darker than its central part due to the influence of brightness shading. The brightness shading occurs due to the reduction in peripheral illumination of a lens attached to the imaging device.
As methods for correcting the brightness shading, it has been proposed to previously perform correction based on the information at the time of optical design of the lens, and to perform correction based on an image obtained by shooting a subject which has uniformly of the same color such as an 18% gray card.
Further, in addition to the brightness shading, a phenomenon called color shading is known to cause color unevenness. The color shading occurs since the central part and peripheral area of the imaging device are different from each other in the removal efficiency of near infrared light included in a light source, depending on the difference in the incident angle with respect to an IR (Infrared Radiation) cut filter attached at the front of the imaging device.
The color shading is a serious problem particularly in a compact digital camera and a camera mounted on a smartphone which are subjected to many restrictions on the design of lens and unit. In order to correct the color shading, generally, color shading correction tables corresponding to light sources are previously prepared and the light source at the time of shooting is detected and identified to perform correction by selecting a color shading correction table corresponding to the light source.
Since the respective imaging devices do not necessarily have the same optical properties and electrical characteristics, it is difficult to correct the brightness shading and color shading as previously expected. For example, since the brightness shading differs depending on the assembly error etc. in the lens attached to the imaging device, it is not easy to inspect and adjust the lens of every imaging device.
Further, the IR cut filter is provided with an absorption type and a reflection type. In the absorption type, a large amount of near infrared light is removed on the periphery of the imaging device at a large incident angle, by which blue becomes deeper on the periphery. On the other hand, in the reflection type, near infrared light is not removed at a large incident angle, by which red becomes deeper on the periphery. Thus, the color shading changes depending on the relationship between the incident angle and the type of IR cut filter attached to the imaging device. Further, in order to correct the color shading, it is necessary to identify the light source first to use a correction table correctly reflecting the optical spectrum of the light source. At this time, under the environment where a plurality of light sources exist, it is a likely to select an incorrect color shading correction table, because it is difficult to identify a correct light source.
Further, when the light source is unknown, it is likely to select a color shading correction table covering a similar color and a greatly different optical spectrum by mistake.
Further, since the conditions of incident light change depending on aperture and zooming, it is difficult to appropriately correct the brightness shading and color shading when a camera having the imaging device enables the user to adjust the aperture, focal length, etc. of the lens.
The present invention has been made in view of the above problems, and the object thereof is to provide an image processor and an image processing method for performing shading correction with high accuracy by a technique as simple as possible.